POV-Ray : Newsgroups : povray.beta-test : Spline inconsistencies : Spline inconsistencies Server Time
29 Jul 2024 22:26:36 EDT (-0400)
  Spline inconsistencies  
From: Rune
Date: 19 Feb 2002 17:36:13
Message: <3c72d35d@news.povray.org>
As far as I have understood, "cubic spline" is a broad class of splines
while "catmull-rom spline" and "natural cubic spline" are specific spline
types.

The spline named "cubic_spline" used in prisms and lathes is more
specifically a catmull-rom spline. The spline named "catmull_rom_spline"
used in sphere_sweeps is also a catmull-rom spline. The fact that they are
identical splines and yet have different names is an inconsistency and it is
bound to be a cause of confusion.

Another inconsistency is the fact that the spline named "cubic_spline" used
in the spline{} feature is a natural cubic spline, but its name
"cubic_spline" is the same as the name for the catmull-rom spline used in
prisms and lathes, which is also called "cubic_spline". This too is
inconsistent and is bound to be a cause of confusion.

To avoid inconsistencies and confusion, identical spline types should have
identical names and different spline types should have different names, all
regardless of in which features they are used (prism, lathe, spline{},
sphere_sweep, and possible future additions).

My suggestion of names is as follows:

The catmull-rom spline will be called "catmull_rom_spline" in all features
where the catmull-rom spline is supported. This includes the spline in
prisms and lathes known as "cubic_spline".

The natural cubic spline will be called "natural_cubic_spline" in all
features where the natural cubic spline is supported. This means that the
currently named "cubic_spline" in the spline{} feature should be renamed to
"natural_cubic_spline".

Only in prisms and lathes the name "cubic_spline" will still be supported
and it will produce the same result as "catmull_rom_spline". This is for
backwards compatibility only, but backwards compatibility is not an issue in
spline{} and sphere_sweep, so the keyword "cubic_spline" do not have to be
supported there. The reason that the name "cubic_spline" should not be
widely supported is that it is the name of a whole class of splines, not a
specific spline type, and in POV-Ray more than one type of cubic splines are
used.

The above proposal will in my opinion make splines in POV-Ray more
consistent to understand and use. But even more so if in the future it is
decided to add additional types of cubic splines besides the two types
currently used.

The name "natural_cubic_spline" is only meant as a suggestion, if there's a
better term, then that should be used, as long as there's no risk of
confusion with other spline types.

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated Feb 16)
POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.